package smoothcraft.cn.shop.data;

import java.util.UUID;

import org.bukkit.inventory.ItemStack;

public class Shop_item {
	private final ItemStack item; 
	private final long price;
	private final UUID id;
	private final int amount;
	public static class Builder {
		private ItemStack item = null;
		private long price = 0;
		private UUID id = null;
		private int amount = 0;
		public Builder(ItemStack item) {
			this.item = item;
			this.amount = item.getAmount();
		}
		public Builder setPrice(long price) {
			this.price = price;
			return this;
		}
		public Builder id(UUID id) {
			this.id = id;
			return this;
		}
		public Shop_item build() {
			return new Shop_item(this);
		}
	}
	private Shop_item(Builder b) {
		this.item = b.item;
		this.price = b.price;
		this.id = b.id;
		this.amount = b.amount;
	}
	public ItemStack getItem() {
		return this.item;
	}
	public long getPrice() {
		return this.price;
	}
	public UUID getId() {
		return this.id;
	}
	public int getAmount() {
		return this.amount;
	}
}
